better url substitution
added see query terms for debug only