There's no reason not to just put all this code into the caller.