remove duplicate interactions within a community