adding ativo attribute to queries