implemented rotation checks against the grid