     ///Returns the absolute value of the smallest angle difference between two directions and an indication of the direction of change
     /// This is useful in determining both the magnitude and direction of the change of heading.
     func headingChangeTo(other:CLLocationDirection) -> (magnitude:CLLocationDirection, motion:CLLocationDirectionMotion) {
-        guard self.isValid() && other.isValid() else {
+        guard self.isValidDirection() && other.isValidDirection() else {
             return (kCLLocationDirectionInvalid, .clockwise)
         }
 

}

extension CLLocation {
    public convenience init(location:CLLocationCoordinate2D) {
        self.init(latitude: location.latitude, longitude: location.longitude)
    }
    

        }

        return (angle, motion)
    }
}

extension CLLocationDistance {
    func isValidDistance() -> Bool {
        return self != CLLocationDistance.NaN
    }
}

extension MKRouteStep {
    var distanceMiles:CLLocationDistanceMiles {
        return metersToMiles(distance)
    }
}

extension MKRoute {
    var distanceMiles:CLLocationDistanceMiles {
        return metersToMiles(distance)
    }

