Why is `addAttribute` here and defined later?