cleared database, semifunctional loop