Completed homework for week3