refactoring in preperation for drawing real grid