flatmap and merge done