Using anonymous functions as callback functions0