refactor table views