wrote lecture 22 on HMM