sweep and prune works