solved exercise 1 for week9