adapting to webapp2