main function create_circuit written