Totally ok with the original implementation.
(and it has nothing to do with the fact that I wrote it)