refactor build