The well known dichotomy conjecture of Feder and Vardi states that for every family Γ of constraints CSP(Γ) is either polynomially solvable or NP-hard. Bulatov and Jeavons reformulated this conjecture in terms of the properties of the algebra Pol(Γ), where the latter is the collection of those m-ary operations (m = 1, 2, . . .) that keep all constraints in Γ invariant. We show that the algebraic condition boils down to whether there are arbitrarily resilient functions in Pol(Γ). Equivalently, we can express this in the terms of the PCP theory: CSP(Γ) is NP-hard iff all long code tests created from Γ that passes with zero error admits only juntas1 . Then, using this characterization and a result of Dinur, Friedgut and Regev, we give an entirely new and transparent proof to the Hell-Neˇsetˇril theorem, which states that for a simple connected undirected graph H, the problem CSP(H) is NP-hard if and only if H is non-bipartite. We also introduce another notion of resilience (we c...