simplify/use uint64_t per nurupo's suggestion