Adding catid to query