added getdent_to_list func