contract PuregoldTokenICO is CappedCrowdsale {
  address public owner;
  uint256 public minimum;

  function PuregoldTokenICO(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet, uint256 _cap, uint256 _minimum) 
    CappedCrowdsale(_cap)
    Crowdsale(_startTime, _endTime, _rate, _wallet) public {
    	owner = msg.sender;
    	minimum = _minimum;
    }

  // creates the token to be sold.
  function createTokenContract() internal returns (MintableToken) {
    return PuregoldToken(0x9b3E946E1a8ea0112b147aF4E6e020752F2446BC);
  }

  // set a minimum purchase
  // @return true if investors can buy at the moment
  function validPurchase() internal view returns (bool) {
    bool minValue = msg.value >= minimum;
    return super.validPurchase() && minValue;
  }
  
  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  function transferTokenOwnership(address _to) onlyOwner public {
    token.transferOwnership(_to);
  }
  
}
function createTokenContract() internal returns (MintableToken) {
  return PuregoldToken(0x9b3E946E1a8ea0112b147aF4E6e020752F2446BC);
}

// creates the token to be sold.