optimized build-script