Changed flatmap(map) nested.