first working version of build script