working code with random walk only, i.e., no deterministic element yet