Added solution for exercise 2