extracted methods from tbl_change.php to insert_edit.lib.php