updated changes to flaskr.py