HMM Solver functional