developing the conditional expectation generator