better approach for rotation