Solved exercise 1