implemented delete function for links