fixed bugs, hierarchicalhmm running but slow. TODO: speed it up