changed order of rank/dimension