hmm struct and creation