added extended language detection