refactoring of build process