function bid() public payable auctionNotEnded isMinimumBid isHighestBid {
        
        
        
        if (highestBidder != address(0)) {
            
            uint lastBid = bids[highestBidder];
            bids[highestBidder] = 0;
            if(!highestBidder.send(lastBid)) {
                
                emit CheaterBidder(highestBidder, lastBid);
            }
        }

        
        highestBidder = msg.sender;
        bids[msg.sender] = msg.value;

        
        auctionState = AuctionStates.Ongoing;
        emit HighestBidIncreased(msg.sender, msg.value);
    }