Added support for endianness