How to filter and segment waybills