implementation refactoring