removed references to undeclared variables