made it work for more than one letter using an array