working on edge detection