Code to loop over parameters