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

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

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

// deploy a new contract