use unsigned int instead of int