update to use c++14/generic lambdas