use unsigned long, not unsigned long long, per gcc warning