at the very least, I would expect this nice function to have some tests :)