Completed HMM sampling procedure