change total from float to uint64_t