updating to work with flexLambda among other things