contract PaymentAddressFactory is Factory {
    // index of created contracts
    mapping (address => address[]) public paymentAddresses;

    constructor() public Factory("1.0.0") {}

    // deploy a new contract
    function newPaymentAddress(address _collector)
        public
        returns(address newContract)
    {
        PaymentAddress paymentAddress = new PaymentAddress(_collector);
        paymentAddresses[_collector].push(paymentAddress);
        addContract(paymentAddress);
        return paymentAddress;
    }
}
function newPaymentAddress(address _collector)
    public
    returns(address newContract)
{
    PaymentAddress paymentAddress = new PaymentAddress(_collector);
    paymentAddresses[_collector].push(paymentAddress);
    addContract(paymentAddress);
    return paymentAddress;
}

// deploy a new contract