contract BasicToken is ERC20Basic {

  using SafeMath for uint256;

  mapping(address => uint256) balances;

  uint256 totalSupply_;

  uint256 totalRecycledTokens_; 

  bool public paused = false; 

  bool public tgeMode = false;

  address public ceoAddress;

  address public marketplaceAddress;


  function totalSupply() public view returns (uint256) {
    return totalSupply_;
  }

  modifier whenNotPaused() { 
        require(!paused);
        _;
  }
  
  modifier whenPaused() { 
        require(paused);
        _;
  }

  modifier onlyCEO() {
      require(msg.sender == ceoAddress);
      _;  
  }

  function pause() public onlyCEO() whenNotPaused() {
      paused = true;
  }

  function unpause() public onlyCEO() whenPaused() {
      paused = false;
  }

  modifier inTGE() {
      require(tgeMode);
      _;  
  }

  modifier afterTGE() {
      require(!tgeMode);
      _;  
  }

  /**
  * @dev transfer token for a specified address
  * @param _to The address to transfer to.
  * @param _value The amount to be transferred.
  */
  function transfer(address _to, uint256 _value) public whenNotPaused() returns (bool) {
    require( !tgeMode || (msg.sender == ceoAddress) ); 
    require(_to != address(0));
    require(_value <= balances[msg.sender]);

    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

  function balanceOf(address _owner) public view returns (uint256) {
    return balances[_owner];
  }

}
function transfer(address _to, uint256 _value) public whenNotPaused() returns (bool) {
  require( !tgeMode || (msg.sender == ceoAddress) ); 
  require(_to != address(0));
  require(_value <= balances[msg.sender]);

  balances[msg.sender] = balances[msg.sender].sub(_value);
  balances[_to] = balances[_to].add(_value);
  Transfer(msg.sender, _to, _value);
  return true;
}

/**
 * @dev transfer token for a specified address
 * @param _to The address to transfer to.
 * @param _value The amount to be transferred.
 */