  We present a technique to treat systems with very many levels, like
molecules, in non-LTE. This method is based on a superlevel formalism coupled
with rate operator splitting. Superlevels consist of many individual levels
that are assumed to be in LTE relative to each other. The usage of superlevels
reduces the dimensionality of the rate equations dramatically and, thereby,
makes the problem computationally more easily treatable. Our superlevel
formalism retains maximum accuracy by using direct opacity sampling (dOS) when
calculating the radiative transitions and the opacities. We developed this
method in order to treat molecules in cool dwarf model calculations in non-LTE.
Cool dwarfs have low electron densities and a radiation field that is far from
a black body radiation field, both properties may invalidate the conditions for
the common LTE approximation. Therefore, the most important opacity sources,
the molecules, need to be treated in non-LTE. As a case study we applied our
method to carbon monoxide. We find that our method gives accurate results since
the conditions for the superlevel method are very well met for molecules. Due
to very high collisional cross sections with hydrogen, and the high densities
of H_2 the population of CO itself shows no significant deviation from LTE.
