finished getAvailableLetters function