changed an instance variable into a local variable