Adding multiple foreign key function