function changed to an anonymous function.

Function changed to an Anonymous function.