corrected use of instance variables