problem 2 - c
problem 3 - c