models and relations defined