function buyToken() public payable saleInProgress {
    require (msg.value >= 10 finney);
    uint purchasedToken = rate.mul(msg.value).div(1 ether);
    
    require(tokenCap >= purchasedToken);
    tokenCap -= purchasedToken;
    token.transferInitialAllocation(msg.sender, purchasedToken);
    
    require(owner.send(msg.value));
    totalContribution += msg.value;
    Purchase(msg.sender, purchasedToken);
  }