I learned how to use -flattenMap: