Generalized sweeper