change PRId64 to %lu (avoid compile warnings on mac)