sorting of resource