test code map/reduce