lang refactoring