Update for getIndexWord.java// add print library method