modified query collection so that name of query must be unique