rough delete_entries function