sorting lines for hand_over and fixing min start_date