refactoring border