refactor language_class