UpdateGrid and CountNeighbours defined