added support for collections as root