moving state into the board component