the culprit: can't slice m-dim array. js bug