working build-script, needs some improvements