stochastic decoder code