refactoring& viewer