function sendToAddress(address _address, uint256 _tokens, uint256 _type) canMint onlyOwner public {

   if (_type != 1 && _type != 2 && _type != 3) {
     revert();
   }

    
    if (_type == 1) {
      if (founding_sold + _tokens > foundingAmount) {
        revert();
      }

      if (founding_buyers_token[_address] == 0) {
        founding_investors.push(_address);
      }

      require(foundingAmount >= _tokens);

      founding_buyers_token[_address] = founding_buyers_token[_address].add(_tokens);
    
      founding_sold = founding_sold + _tokens;

      token.transferTokens(_address, _tokens, public_sale_start, 1);

      foundingAmount = foundingAmount - _tokens;
    }
    
    if (_type == 2) {
      if (peInvestors_sold + _tokens > PEInvestorAmount) {
        revert();
      }

      if (pe_buyers_token[_address] == 0) {
        pe_investors.push(_address);
      }

      require(PEInvestorAmount >= _tokens);

      pe_buyers_token[_address] = pe_buyers_token[_address].add(_tokens);
    
      peInvestors_sold = peInvestors_sold + _tokens;
      
      token.transferTokens(_address, _tokens, public_sale_start, 2);

      PEInvestorAmount = PEInvestorAmount - _tokens;
    }
    
    if (_type == 3) {
      require(coreTeamAmount >= _tokens);
      token.transferTokens(coreTeamAddr, _address, _tokens, public_sale_start, 3);
      coreTeamAmount = coreTeamAmount - _tokens;
    } else {
      soldTokens = soldTokens + _tokens;
    }
  }