Code looks a little cleaner with an anonymous function so I've gone ahead and done that.