added auto language detection