generate two tables, fix missing data