now doing "flatten" with a fit