start to refactoring