refactoring round2