almost works, but there is an error where only the last letter of a word is put on the board