make primary tables