Step 2: Sweeping Transformation