replace size_t with uint64_t