add sorting to partial