contract ModulePromoToken is AbstractVirtualToken {
  /**
   * Number of virtual tokens to assign to the owners of addresses from given
   * address set.
   */
  uint256 private constant VIRTUAL_COUNT = 5;
  
  /**
   * Number of tokens to give to the contract deployer for future distribution.
   */
  uint256 private constant INITIAL_TOKENS = 10e6;

  /**
   * Create ModulePromoToken smart contract with given address set.
   *
   * @param _addressSet address set to use
   */
  function ModulePromoToken (AddressSet _addressSet)
  public AbstractVirtualToken () {
    owner = msg.sender;
	accounts[owner] = INITIAL_TOKENS;
    addressSet = _addressSet;
  }

  /**
   * Get name of this token.
   *
   * @return name of this token
   */
  function name () public pure returns (string) {
    return "Promodl";
  }

  /**
   * Get symbol of this token.
   *
   * @return symbol of this token
   */
  function symbol () public pure returns (string) {
    return "PMOD";
  }

  /**
   * Get number of decimals for this token.
   *
   * @return number of decimals for this token
   */
  function decimals () public pure returns (uint8) {
    return 0;
  }

  /**
   * Notify owners about their virtual balances.
   *
   * @param _owners addresses of the owners to be notified
   */
  function massNotify (address [] _owners) public {
    require (msg.sender == owner);
    uint256 count = _owners.length;
    for (uint256 i = 0; i < count; i++)
      Transfer (address (0), _owners [i], VIRTUAL_COUNT);
  }

  /**
   * Kill this smart contract.
   */
  function kill () public {
    require (msg.sender == owner);
    selfdestruct (owner);
  }

  /**
   * Change owner of the smart contract.
   *
   * @param _owner address of a new owner of the smart contract
   */
  function changeOwner (address _owner) public {
    require (msg.sender == owner);

    owner = _owner;
  }

  /**
   * Get virtual balance of the owner of given address.
   *
   * @param _owner address to get virtual balance for the owner of
   * @return virtual balance of the owner of given address
   */
  function virtualBalanceOf (address _owner)
  internal view returns (uint256 _virtualBalance) {
    return addressSet.contains (_owner) ? VIRTUAL_COUNT : 0;
  }

  /**
   * Address of the owner of this smart contract.
   */
  address internal owner;

  /**
   * Address set of addresses that are eligible for initial balance.
   */
  AddressSet internal addressSet;
}
/**
 * Module Promo Tokem Smart Contract.
 */
function changeOwner (address _owner) public {
  require (msg.sender == owner);

  owner = _owner;
}

/**
 * Change owner of the smart contract.
 *
 * @param _owner address of a new owner of the smart contract
 */