refactoring for client to also leverage config file