add before_request & teardown_request