using instance variables better