partial implementation of handling wraparound