added sobel edge detection