adding support for nested models