remove some unnecessary lambdas