Update: add index to each param to uniquely identify params with the same name