made setBoard function