implemented is_little_endian algorithm