Hi Ronald,
That is what the code already does.
Jean-Marc,
Do you mind if I take the code you wrote, modify it, and then put it on github under this BSD license?