updated delete method