add mp hmm mix query segments and unittest