function doPayment(address _owner)
    only_during_sale_period_or_whitelisted(_owner)
    only_sale_not_stopped
    non_zero_address(_owner)
    minimum_value(minInvestment)
    internal {
        
        uint256 tokenAmount = SafeMath.mul(msg.value, getPrice());
        
        if(tokenAmount > getTokensLeft()) {
            throw;
        }
        
        token.transfer(_owner, tokenAmount);

        
        totalCollected = SafeMath.add(totalCollected, msg.value);

        NewBuyer(_owner, tokenAmount, msg.value);
    }