replaced for loop over a parameter array with a casex