debugging the sweep phase