Change structure of board to flat array