debugging and tests. gridAndCoords is insane again