add class attribute of target to insertFunction parameter