put letters in grid; a bit of refactoring