Randbat script update