extending delete() function