use size_t instead of int64_t for size