refine build system