added foreign key constraints