updates to recursive sort and naming