refactored and get/set