I'm not a big fan of jumping out of a function in the middle. Is there a possibility to only have one return? If the solution would make the whole thing much more complex, we stay with this implementation.