add sortnum to nested model