Solution for week 7