add endian conversion