This should be a private helper method, not an inner function.