working on query string substitution