added instance variables.
refactored.
created for refactoring.