add sorting to all resources