added basic greyscale and edge detection code