Added toQueryString method