changed undefined variable