adding support for the root element being an array