fix getPeakScores to use split-apply-combine type technique