delete functionality updated