adding comments for addAttribute method