contract Finalizable is Ownable {
  event Finalized();

  bool public isFinalized = false;

  /**
   * @dev Modifier to make a function callable only when the contract is not finalized.
   */
  modifier whenNotFinalized() {
    require(!isFinalized);
    _;
  }

  /**
   * @dev called by the owner to finalize
   */
  function finalize() onlyOwner whenNotFinalized public {
    finalization();
    Finalized();

    isFinalized = true;
  }

  /**
   * @dev Can be overridden to add finalization logic. The overriding function
   * should call super.finalization() to ensure the chain of finalization is
   * executed entirely.
   */
  function finalization() internal {
  }
}
/**
 * @title Finalizable
 * @dev Base contract which allows children to implement a finalization mechanism.
 * inspired by FinalizableCrowdsale from zeppelin
 */
function finalize() onlyOwner whenNotFinalized public {
  finalization();
  Finalized();

  isFinalized = true;
}

/**
 * @dev called by the owner to finalize
 */