modify sort template