first tables refactoring