#3 removed some wraparound code