add nested model support