Modification to work with appengine