New Version with better usage of lambdas