Transfer parameter-value from loop to function

Unless you actually delete it then the compiler will use its value and store values in it