A Chicago man who allegedly stole a 16-year-old’s phone at gunpoint was caught by police after using the device’s UberEats app to make a food delivery order, police say.

Anthony Sorrells, 18, is now facing two counts of armed robbery following the incident Saturday afternoon, in which he is accused of placing a pistol to the back of the neck of the victim and demanding his belongings, police told the Chicago Sun-Times.

“One minute the victim is walking down the street and then he’s looking down the business end of a pistol,” Judge John Fitzgerald Lyke Jr. said over the weekend after denying Sorrells’ bond.

Two hours after the robbery, police were able to trace Sorrells to his grandmother’s home by using credit card information that was added into a meal delivery app on the victim’s stolen phone, the Chicago Sun-Times reported.

Prosecutors say Sorrells was found with the phone and was wearing a belt stolen from the victim, who later identified him as the alleged robber.

At the time of his arrest, Sorrells was attending high school and was already released on bond for a previous burglary case, attorneys said. He also has past convictions for juvenile offenses of retail theft, resisting an officer and unauthorized use of a weapon, according to the Chicago Sun-Times.

Sorrells is due to appear again in court on Nov. 16.