process payload inside for loop