sample program to check if word is in dictionary