updating code to work wit GAE