contract LocalToken is Token {

    string  public localityCode;
    uint    public taxRateNumerator = 0;
    address public govtAccount = 0;
    address public pmtAccount = 0;
    UniversalToken public universalToken;

    function LocalToken(
            uint _maxTokens,
            uint _taxRateMult,
			string _tokenSymbol,
			string _tokenName,
            string _localityCode,
            address _govt,
            address _pmt,
            address _universalToken
            ) public
            condition(_maxTokens > 10)
            condition(DENOMINATOR > mul(_taxRateMult, 2))
            condition((_taxRateMult > 0 && _govt != 0) || _taxRateMult == 0)
            condition(_universalToken != 0)
    {
        universalToken = UniversalToken(_universalToken);
        require(msg.sender == universalToken.owner());
		decimals = DECIMALS;
		symbol = _tokenSymbol;
		name = _tokenName;
        localityCode = _localityCode;
        _supply = mul(_maxTokens, WAD);
        govtAccount = _govt;
        pmtAccount = _pmt;
		owner = msg.sender;
        if (_taxRateMult > 0) {
            taxRateNumerator = _taxRateMult;
        }
		_balances[owner] = _supply;
    }

    function modifyLocality(string newLocality) public
        auth
    {
        localityCode = newLocality;
    }

	function modifyTaxRate(uint _taxMult) public
        auth
		condition(DENOMINATOR > 2 * _taxMult)
    {
		taxRateNumerator = _taxMult;
	}

    // To reset gvtAccount when taxRateNumerator is not zero, 
    // must reset taxRateNumerator first.
    // To set govtAccount when taxRateNumerator is zero,
    // must set taxRateNumerator first to non-zero value.
    function modifyGovtAccount(address govt) public
        auth
        condition((taxRateNumerator > 0 && govt != 0) ||
                (taxRateNumerator == 0 && govt == 0))
    {
        govtAccount = govt;
    }

    function modifyPMTAccount(address _pmt) public
        auth
    {
        pmtAccount = _pmt;
    }
}
// Local Token
function modifyGovtAccount(address govt) public
    auth
    condition((taxRateNumerator > 0 && govt != 0) ||
            (taxRateNumerator == 0 && govt == 0))
{
    govtAccount = govt;
}

// To reset gvtAccount when taxRateNumerator is not zero, 
// must reset taxRateNumerator first.
// To set govtAccount when taxRateNumerator is zero,
// must set taxRateNumerator first to non-zero value.