long changed to int64_t