Added code for lecture 1