utilizing 'instructionIndex' variable