Updated version/tiny refactoring of a global variable