close but endianness not working