Added sample code for lecture 5 section 2.1