Modified function into an anonymous function.