relocated some functions.
modified the table-conversion rule.