add table solved minor bugs