addition of global variables and concept of readcfg() function