flatten works