some changes to the circuit.dart file