sorting on each level by sorting in list_children function