automatic query thread added