the & is indeed strange, I'll remove it since substr does not return a reference to the best of my knowledge. Is there a prefered place to add unit tests for this parts of the code or should I create one ?