refactored to remove getters