implemented delete method