support functions to make flask webapps easier