changing to foreign key was a bad idea