test code to show how map-reduce work