worked on grid rotation