trying to optimize combineInPlace