Added code for lecture #2.