  For a general Calderon-Zygmund operator $T$ on $R^N$, it is shown that
$\|Tf\|_{L^2(w)}\leq C(T)\|w\|_{A_2}\|f\|_{L^2(w)}$ for all Muckenhoupt weights
$w\in A_2$. This optimal estimate was known as the $A_2$ conjecture. A recent
result of Perez-Treil-Volberg reduced the problem to a testing condition on
indicator functions, which is verified in this paper. The proof consists of the
following elements: (i) a variant of the Nazarov-Treil-Volberg method of random
dyadic systems with just one random system and completely without bad parts;
(ii) a resulting representation of a general Calderon-Zygmund operator as an
average of dyadic shifts; and (iii) improvements of the
Lacey-Petermichl-Reguera estimates for these dyadic shifts, which allow summing
up the series in the obtained representation.
