Solution to Problem 42. Added function to get Word Value helper function