Used library code for hex conversion.