implemented Sobel edge detecting algorithm. It works but handles edge cases incorrectly. Will fix later.