2d index macro