solving problem 2
solving problem 2