refactoring and getters/setters