added delete handling