adding support for MDArray