fix order of types, fix reverse_endian bug, add hex_string_to_array