the final param merge needs to be scoped in the loop