add sort total list function