adjusted globalVariables.cpp