to build the config dynamically