function pay() private {
        
        uint128 money = uint128(address(this).balance);

        
        for(uint i = 0; i < queue.length; i++) {

            uint idx = currentReceiverIndex + i;  

            Deposit storage dep = queue[idx]; 

            if(money >= dep.expect) {  
                dep.depositor.transfer(dep.expect); 
                money -= dep.expect; 

                
                delete queue[idx];
            } else {
                
                dep.depositor.transfer(money); 
                dep.expect -= money;       
                break;                     
            }

            if (gasleft() <= 50000)         
                break;                     
        }

        currentReceiverIndex += i; 
    }