add table in "preview" function