refactoring v3