defined relationships between 3 models