use unsigned int rather than unsigned long int for 32-bit type