Added delete function to delete button