simplified.  do sort of raw data before dumping, so sort later not needed.