edge detection added