Walking algorithm COMPLETE