added some wandering code.