query only if term is sent