refactor for language