added relationships and scopes