Add all sorting function