lecture code from Oct15