fixed small bug in logic that made sure that the subWord was less than word