most recent update that fixes some bugs, but I am still tracing a bug in the stochastic variable