move global variables to common.h