refactor interceptor