test ensure index 2d