added support for nested objects