Solutions for week 2 and 3