version 1.9 corrects undeclared global variables