edited to_hex