working delete method implemented