creates relations for models