refactor table access usage