before saving rand_list to save pdf