checking delete function