changed a little bit in grid