added _factor to hmm resampling example