add range query thread