sort variables in array so that random order won't produce change each time