use unsigned int for log and move hex string to util