add viterbi caching test to hample