edit lecture: add loop to lecture 06