solved endian problem