several updated for working on the appengine server