very tiny HMM program in javascript