Implementation for lookForWord method.