host endian conversion was overcomplicated