create separate addIcon function