language recognizer - fix and improve