refactoring data