Modified isOnRoute logic and onUpdatedLocation