fixed the addToWalk function