Added a random walk algorithm