edit lecture: lecture 17: finish StateIO