adding foreign key constraints