contract Pausable is Ownable{ 
    event Pause();
    event Unpause();

  bool public paused = false;

  mapping (address => bool) public frozenAccount;
  event FrozenFunds(address target, bool frozen);

    // freeze, unfreeze 
  function freezeAccount(address target, bool freeze) onlyController public {
    frozenAccount[target] = freeze;
    emit FrozenFunds(target, freeze);
  }

  // need deploy
  function isFrozenAccount(address target) onlyController public view returns (bool) {
      return frozenAccount[target];
  }
  
  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(paused);
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    emit Pause();
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused public {
    paused = false;
    emit Unpause();
  }  
}
function freezeAccount(address target, bool freeze) onlyController public {
    frozenAccount[target] = freeze;
    emit FrozenFunds(target, freeze);
  }
// freeze, unfreeze 