adding functionality to flask app