new flattening support