data structure refactoring