Here are the changes to hmm and cluster.py