changed delete method