adjusting to new database; fixing logic for forming complete deletion lists