working on delete function