Added example code from lecture 3.