updated partly to thomas lambdantupleconsumer