function to remove edges from a graph