custom hmm 4