start randomwalk SM code