connect class for different queries