Well, I think my algo is correct but it doesn't validate 2 things (well I admit, I don't used correctly the "greaterThan" because I found something more efficient)...