filled in a few functions in app.py