changes for hasMany