moved the config loading around