fully working build script