modified randomwalk but not work yet