Added functions in app.py file