first example of reduce()