added turn argument to nextPos method