drawing grid, math is hard