move config into constructor