added drawing of the grid