constructor for lambdas