rearranged for use as a flask webapp