add hexToDecimal method.