source code taken from Google photohunt demo at: https://developers.google.com/+/photohunt/python