removed unnecessary lines of code from canny