finish search and delete