add discrete hmm training and fb