add table and detial