I'd just define that function here inline instead of putting it in a global.