function bid(address _ref)
        public
        payable
    {
        uint256 _eth = msg.value;
        uint256 _ethUse = msg.value;
        uint256 _now = now;
        uint256 _promoteAmount;
        uint256 _teamAmount;
        uint256 _otherAmount;

        require(block.number >= startBlockNo, "Need start");

        
        if (bonusEndTime != 0 && bonusEndTime < _now)
        {   
            uint256 bonus_t = bonus;
            address leader_t = leader;
            bonus = 0;
            leader = address(0);
            lastPrice = 0;
            bonusEndTime = 0;
            leader_t.transfer(bonus_t);
        }

        uint256 _maxPrice = (1000000000000000000).add(lastPrice);
        
        require(_eth >= (100000000000000000).add(lastPrice), "Need more Ether");
        
        if (_eth > _maxPrice)
        {
            _ethUse = _maxPrice;
            
            msg.sender.transfer(_eth.sub(_ethUse));
        }

        bonusEndTime = _now + 12 hours;
        leader = msg.sender;
        lastPrice = _ethUse;

        if (_ref != address(0) && _ref != msg.sender)
        {
            uint256 _refTotal = invested_m[_ref].amount;
            if (_refTotal < 5000000000000000000)
            {
                _promoteAmount = (_ethUse.mul(3) / 100);
                _teamAmount = (_ethUse.mul(7) / 100);
            } else if (_refTotal < 20000000000000000000) {
                _promoteAmount = (_ethUse.mul(5) / 100);
                _teamAmount = (_ethUse.mul(5) / 100);
            } else {
                _promoteAmount = (_ethUse.mul(7) / 100);
                _teamAmount = (_ethUse.mul(3) / 100);
            }

            _ref.transfer(_promoteAmount);
        } else {
            _teamAmount = (_ethUse.mul(10) / 100);
        }

        owner.transfer(_teamAmount);

        _otherAmount = (_ethUse.mul(45) / 100);

        floatFund = floatFund.add(_otherAmount);
        bonus = bonus.add(_otherAmount);
    }