Add calculate-next-position