app.py new functions