Uber may be working on technology which would detect if users of its app are drunk or high. A patent application from the company, revealed this week, outlines a system that would be able to identify if someone is displaying uncharacteristic behaviour by looking at small changes in their behaviour as they use the Uber app.

The patent includes a list of potential data Uber could use to determine an app user’s level of inebriation. This includes walking speed, unusual typos made while inputting a ride request, the angle at which a user holds the phone and whether the phone is swaying. While the patent application doesn’t spell out that the proposed tool would be used to identify if someone is drunk or on drugs – it refers instead to “‘predicting user state using machine learning” and “uncharacteristic user states” – that would be the most likely interpretation.

If the theoretical AI system does detect that someone is acting in an unusual way it will tailor Uber’s services accordingly. The patent application suggests ways Uber might tailor its services, such as directing users to a better-lit pickup point, for example, or matching users with a driver who has been trained to deal with drunk passengers. Uber says it may also use the technology to prevent users from pooling with other passengers.

While working on special safety measures for intoxicated passengers sounds helpful, the patent application shines a light on the scope of Uber’s current data collection methods, and poses questions about the potential for data like this to be abused. The startup very publicly turned over a new leaf with the resignation of the scandal-ridden co-founder Travis Kalanick and the appointment of Dara Khosrowshahi as CEO last year, but it has a murky history when it comes to its customer data. Uber’s notorious “God View” tool, for example, which showed the location of users who had requested a car, was abused by employees to track the location of their exes as well as monitor celebrities and politicians, according to an October 2016 court declaration by Uber’s former forensic investigator, Samuel Ward Spangenberg.

There’s also the worry that the system might put drunk users in danger. According to a recent CNN investigation, at least 103 Uber drivers in the US have been accused of sexually assaulting or abusing their passengers in the past four years, and many of these victims were drunk.

And a tool like this could be misused when it comes to charging customers. Uber’s pricing strategy is something of a black box; nobody knows exactly how their algorithm works, but the company does seem to have a lot of insights about when its customers are likely to pay more. In 2016, for example, a behavioral scientist at Uber said that the company knew that people were more willing to pay a higher fare when their phone batteries were low, but was careful to say that they “absolutely don’t use that” information. One imagines that drunk passengers are also likely to be less cautious about how much money they’re spending.

There is no evidence that Uber’s patent application is anything other than theoretical at the moment. The company did not immediately respond to a request for comment. But there’s nothing to say they’re not already analysing this data.

Uber has not said whether it are collecting this kind of data already, but the company has not been adverse to building user profiles in the past. In 2014 Uber used passenger data to demonstrate which US city had the highest incidence of one-night stands