Add after_request method