problem 2 solved and commented