First final version for the problem 325 before sumbit the code