table creation and insertion