adding support for outputing multi-shape data arrays