use << instead of push
map and reduce