w2 refactoring