refactoring v2