You could define a Compose at the beginning of your loop and then extract its values in the next steps.