added endian funcs