table view refactor