made flaskapp.py functional