written and compiled hmmSegment, need to test