Implementation of a better sweeper, based on the data stored in the DB