added parsing of query string