pass in config into require to get function