fixing walk code