Added hex_dec implementation