Got weekend plans? Foursquare’s latest app, Rager, will get you drunk, fill you up with pizza, and send you home in a cab.

Created by the Barbarian Group, Rager builds on the Foursquare Connected Apps API to recommend your next bar when you’re already out on the town.

Explained the team, “When you’re in New York, Rager tells you the nearest bar that your friends like to go to, the closest bar that we recommend and where to find a hot slice or a car ride home.” (The car part is synched with on-demand car service Uber.)

This flowchart explains the logic behind the app:

Advises the Foursquare team, “Connect the app here and stay classy, folks.”