lecture 12 initial version