test ensure 2d index