methods for edge filtering added