table2: small refactoring