finished homework for week 3 (term 005)