better to use flask.g