cahanges in the datatype in generate_hmm_para function