making getRandVal
test of compareArray
test of getRandVal