refactor common code into shipment_handler_base