function createPipe (
    uint256 _termsNumber,
    uint256 _allowance,
    bytes32 _secretHash
  ) public {
    require(msg.sender == owner);

    SalesPipe pipe = new SalesPipe(owner, _termsNumber, smartToken, _secretHash);

    address pipeAddress = address(pipe);

    smartToken.approve(pipeAddress, _allowance);

    indexToPipe[pipeIndex]   = pipe;
    pipeToIndex[pipeAddress] = pipeIndex;
    pipeIndex++;

    emit CreateSalesPipe(pipeAddress);
  }