add flattenList