Removing duplicate code in parameter setting function