refactor TableBase for better extension