fixing up app.py some more