Trying out edge smoothing algorithm