add query to the url function