taking into account the endianity