Implemented delete function