revised endianness testing to work on raspberry pi