refactor away instance variables