fixed bugs in stochastic perambulator routine