Completed the CRUD by adding delete function