Control the number of times viterbi runs.
added `scorePlusX` function