filtering module to remove some edges