based on r313 of https://code.google.com/p/foursquare-api-java/