took out unused data struct
refactored letterMap to a function