added delete logic