added random array function