updated valid_names_list fn