added the end of the problem and some comments