data structures refactoring