make to_hex static