more lecture 4 code.