works well to sort and spit by group