moved app.run to __main__