bigsum corrected; lambdas used