added the delete method in the end.