added full solution for exercise 1