dimensionality not hardcoded in fit