running on Google AppEngine
Tweaked to run on Google AppEngine