wrote complicated total stats sort. haven't tested yet