need to have a return value in anonymous function