replaced nested model with relational