remove comments before submiting query to REST api