finished hw1 HMM