adding support for MDArrays