complete solution to week3