Dictionary.com
Thesaurus.com
had been wandering
  • past perfect progressive of wander.