debugged code, variable name error