Why is this being defined outside the function, if that's the only place it's used?