use lambdas in preparation for big changes