replaced (nonexisting) nGens with ncols