add refactor class
add unit test, add basic refactoring