Adding functionality to the circuit class.