move config parsing into one func