change class variables to instance variables