fix sobel problem and add arguments to function