master: adding foreign keys