add map() and reduce() method