everything compiles
here
merged hmm.cpp