set a new value to given coordinates in the grid