  We study an irreducible real-analytic germ of an $n$-dimensional variety in
$n$ dimensional complex space. Assuming that the variety is Segre nondegenerate
we define an averaging operator that generalizes the Moser--Webster involution.
This operator can be thought of as being the CR structure of the singularity,
and using this operator we study the set of functions that are restrictions of
holomorphic functions. We give a condition on the flattening of the
singularity, that is realizing the singularity as a codimention one subvariety
of a nonsingular Levi-flat hypersurface.
