added config file and some global variables