lang refactor