hasReturned method now tries to get as close to origin as possible rather than just within a certain distance.