build refactoring