solution to problem 2
- solution to problem 3