summation-puzzle and reverse() function