improved algorythm for generating random letters