check how to solve the anonymous function need to return a value.