refactored data management