Foreign key implementation working