now I have all the functions required for the derivation of the conditional expectations. Still, I need debug my code.