Given a variety, one wants to blow up the worst singular locus, show that it gets better, and iterate until the singularities are resolved. Examples such as the whitney umbrella show that this iterative process cannot be done by blowing up smooth loci - it goes into a loop. We show that there is a functorial way to resolve varieties using weighted blowings up, in the stack-theoretic sense. To an embedded subvariety of a smooth variety one functorially assigns an invariant and a center whose stack-theoretic weighted blowing up has strictly smaller invariant under the lexicographic order. This is joint work with Michael Tëmkin (Jerusalem) and Jarosław Włodarczyk (Purdue). A similar result was discovered by M. McQuillan.