removed flawed lambda function