def remove_added_loadgen(net_t, loadorgen):
    """
    Removes load or sgen namned Cap test

    INPUT
        net_t (PP net) - Pandapower net
        loadorgen (str) - 'sgen' or 'load' for generation or load for additional capacity connected

    OUTPUT
        net_t (PP net) - Updated Pandapower net
    """
    if loadorgen == "load":
        net_t.load = net_t.load.drop(net_t.load[net_t.load.name == 'Cap test'].index)

    elif loadorgen == "sgen":
        net_t.sgen = net_t.sgen.drop(net_t.sgen[net_t.sgen.name == 'Cap test'].index)

    return net_t