Added time variable as well.  Fix to oscillation formula (and for generation, we want fixed values