system refactoring