added code for 10th lecture