First version of our map reducer