construct 2d array