add two solutions of exercise 3