correctly (and better) initialize 2d array