refactoring v4