Updated A Funct with graph labels