Use #flat_map instead of mapping then flattening like a n00b