nit: put a const above and express all large numbers in terms of that, like  ```  constexpr uint64_t one_billion = 1000*1000*1000;  ```  I feel like on some platform/compiler, 10000000000 would not compile because it's not got a size spec like ULL (non-portable) and won't fit in an int, but the above hack will work around that without excessive ugliness cause one billion will fit in an int.  