Duplicating logic for every element