added basic language detection