improved build script