updated flattened