2d array row or column first