factor out `getIccByIndex`