week 7 code by linjingjian