add new table, refactor foreign keys