so if total becomes uint64_t, this would need to change also