moved nested fields to model functions