representing the grid - higher order functions