build scripts optimization