Solved exercise 2c