week 9 code by linjingjian