capture variables out of the lambda.