refactoring table displays