automatically creating tables from module codes