add sorting to catalog query