[UPDATE] extracted base query class.