Uploaded code of lecture 9