using var as foreign key