refactoring table views