reorganized global variables