Coming back from my weekend I've finally built a more functionnal solution in F#