added support for deep nesting of parameters