improved build.sh