implement IN and NOT IN queries