added code to parse  urls and query wave