wandering logic