#24 generalizing loadConfig