correct the method of random walk