added shallPaletteBeSorted to qrmc