Ca marche assez bien, il faut optimiser la seconde partie je pense