added comments to the second problem solution