add initBoard function and unit test