added check_language method