updated the delete method. work in progress