problem with looping thrgh lambdas