add validation for query string