correctly reference variables as instance variables