Wrote circuit breaker code for #25