modified code before deploying and testing app on pythonanywhere server successfully