grid shifting with wraparound implemented