vertical movement code