adding basic map, flatMap functionality