implement global variables