initial movement code