build refactor