moved some global variables