modification of lambdas for ML