this is the exercise code using the flask framework