changed the grid to a directive