function pay() internal {

        uint money = address(this).balance - prize;
        uint multiplier = calcMultiplier();

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

            uint idx = currentReceiverIndex + i;  

            Deposit storage dep = queue[idx]; 

            uint totalPayout = dep.deposit * multiplier / 100;
            uint leftPayout;

            if (totalPayout > dep.payout) {
                leftPayout = totalPayout - dep.payout;
            }

            if (money >= leftPayout) { 

                if (leftPayout > 0) {
                    dep.depositor.send(leftPayout); 
                    money -= leftPayout;
                }

                
                depositNumber[dep.depositor] = 0;
                delete queue[idx];

            } else{

                
                dep.depositor.send(money); 
                dep.payout += money;       
                break;                     

            }

            if (gasleft() <= 55000) {         
                break;                       
            }
        }

        currentReceiverIndex += i; 
    }