added solutions the second problem