refactor with tableize