amended flask app file