adding wraparound for navigation