Added new test and corrected error in inputWord function.