refactored code
accessors and mutators