public static BlackBox rippleAdder(int amount) {
        BlackBox[] fullAdders = new BlackBox[amount];
        BlackBox rippleAdder = new BlackBox();

        for (int i=0; i<amount; i++) {
            if (amount==1) {
                fullAdders[i] = CreateBlackBox.fullAdder();
                rippleAdder.addElement(fullAdders[i]);
            }
            else if (amount-i==1) {
                fullAdders[i] = CreateBlackBox.fullAdder();
                fullAdders[i].setInput(2, fullAdders[i-1].getOutput().get(0).getOutput(0));
                rippleAdder.addElement(fullAdders[i]);
            }
            else if (i==0){
                fullAdders[i] = CreateBlackBox.fullAdder();
                Wire wire1 = new Wire();
                fullAdders[i].setOutput(0, wire1);
                rippleAdder.addElement(fullAdders[i]);
                rippleAdder.addWire(wire1);
            }
            else {
                fullAdders[i] = CreateBlackBox.fullAdder();
                fullAdders[i].setInput(2, fullAdders[i-1].getOutput().get(0).getOutput(0));
                Wire wire1 = new Wire();
                fullAdders[i].setOutput(0, wire1);
                rippleAdder.addElement(fullAdders[i]);
                rippleAdder.addWire(wire1);
            }
        }

        //Element rippleAdder1 = rippleAdder.newInstance();
        //return (BlackBox)rippleAdder1;

        return rippleAdder;
    }