improve merge.sh