generate lambda functions instead of usual functions