pre-transportation function