adding code for language detector