refactor global variables