function abortSale()
    public
    isActive
    onlySaleCreator
    onlyWhenSelling
  {
    require(!currentSale.ended);

    address investor = currentSale.investor;
    address shareholder = currentSale.shareholder;
    address company = address(this);

    
    investor.transfer(currentSale.weiRaised);

    
    require(token().transferFrom(investor, company, currentSale.sharesSold));

    
    require(token().transferFrom(company, shareholder, currentSale.sharesCap));

    
    SaleAborted(now);

    
    currentSale.exists = false;
  }