add resource sorting