Version has only one loop but all values returned are the sum of all scores.  Log that is printed to the screen in this code is much more helpful, though.