optimize build process