moved random seed for generating array to main method