second problem
problem 3