defined an undefined variable deg