consolidate repeated query string