linked to query