refactoring build process