refine the movement code to allow for sharp turns