refactoring HMM: ModelManager tested successfully