solved exercise 1