querySpec fn