adding delete event to links and updating view