improve nested models handling, related with #18
#20 nested models example