solved problem #3 to test word validity in the scrabble like game leveraging the function i wrote for problem #2