refactoring, compact data structures