uploaded edge detection code