pass in config and data