solved exercises 1-6 for week 3