refactoring, new internal format