partial HMM speedup mods