fixed rand2.sh a bit