use map() and not forloop