Finished homework for week 3