Tried to implement grid, not working properly