week 10 code by linjingjian