Modify the average and scale to match the new make_array. Couple of potential problems of the calling. --YCao