refactored RotateableGrid