lecture: lecture 13: finish AMState class