adding delete function