second problem
third problem