reuce number of lambdas