refactor build directory