Wacky: Changed anon func to regular func

Changed the anonymous function to a regular function to fix the problem
with console.log printing the function instead of the value