moved config to end (!!), converted factory to provider