improve word detection