Establishing relationship beetwen models