I think that this code would be much simpler if you just decrease `queue_.front().size` instead of accumulating limits somewhere.