fixed foreign keys finally and finished exercise 4