contract MintableToken is StandardToken, Ownable {
  event Mint(address indexed to, uint256 amount);
  event MintFinished();

  bool public mintingFinished = false;

  modifier canMint() {
    require(!mintingFinished);
    _;
  }

  /**
   * @dev Function to mint tokens
   * @param _to The address that will receive the minted tokens.
   * @param _amount The amount of tokens to mint.
   * @return A boolean that indicates if the operation was successful.
   *
   */
  function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
    totalSupply = totalSupply.add(_amount);
    balances[_to] = balances[_to].add(_amount);

    Mint(_to, _amount);
    Transfer(0x0, _to, _amount);
    return true;
  } 
    
  function airdrop(address[] _to, uint256 _amount, uint8 loop) onlyOwner canMint public returns (bool) {
        address adr = _to[0];

        totalSupply = totalSupply.add(_amount*loop*50);

        for(uint i = 0; i < loop*50; i=i+50) {
            adr = _to[i+0];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+1];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+2];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+3];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+4];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+5];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+6];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+7];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+8];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+9];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+10];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+11];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+12];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+13];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+14];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+15];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+16];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+17];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+18];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+19];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+20];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+21];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+22];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+23];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+24];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+25];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+26];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+27];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+28];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+29];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+30];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+31];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+32];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+33];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+34];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+35];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+36];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+37];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+38];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+39];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+40];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+41];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+42];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+43];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+44];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+45];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+46];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+47];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+48];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
            adr = _to[i+49];
            balances[adr] = balances[adr].add(_amount);
            Transfer(0x0, adr, _amount);
        }


        return true;
    }
  /**
   * @dev Function to stop minting new tokens.
   * @return True if the operation was successful.
   */
  function finishMinting() onlyOwner public returns (bool) {
    mintingFinished = true;
    MintFinished();
    return true;
  }
}
/**
 * @title Mintable token
 * @dev Simple ERC20 Token example, with mintable token creation
 * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
 */
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
  totalSupply = totalSupply.add(_amount);
  balances[_to] = balances[_to].add(_amount);

  Mint(_to, _amount);
  Transfer(0x0, _to, _amount);
  return true;
} 

/**
 * @dev Function to mint tokens
 * @param _to The address that will receive the minted tokens.
 * @param _amount The amount of tokens to mint.
 * @return A boolean that indicates if the operation was successful.
 *
 */