refactor build and up