now it works for Big endian