rearranging things as cargo expects