fixed relationship code