refactoring insert system