initial version of reading global variables