Added a method to collect all names of a variable