start of config loading code