added functionality on Delete button