undefined problem with the circuit