clone refactoring