add circuit breaker code