replace lambdas with bind