added the circuit number generator