add interceptor function