use payloadIndex for loop variable.