put some order on app.py file for better code inderstanding