implementation of chmm.cpp on written draft model.
sync names of variables with paper